import { reject } from "async";
import axios from "axios";
axios.defaults.baseURL="http://172.26.24.67:8080";
axios.defaults.timeout=5000;
export const requests= {
    get:function(path,data) {
       return new Promise(function(resolve,reject) {
           axios.get(path,{
               params:data
           }).then(function(response) {
               resolve(response.data)
           }).catch(function(error) {
               reject(error)
           })
       })
    },
    post:function(path,data) {
        return new Promise(function(resolve,reject) {
            axios.get(path,{
                params:data
            }).then(function(response) {
                resolve(response.data)
            }).catch(function(error) {
                reject(error)
            })
        })
     },
}